package com.designschool.base.util;

import android.content.Context;
import android.text.ClipboardManager;

/***
 * 
 * @项目名:base  
 * 
 * @类名:WriteUtils.java  
 * 
 * @创建人:shibaotong 
 *
 * @类描述:进行文字的编辑，复制粘贴等等
 * 
 * @date:2014-4-2
 * 
 * @Version:1.0 
 *
 *****************************************
 */
public class WriteUtils {
	
	private static ClipboardManager clipboardManager;
	
	/***
	 * 进行文字的复制
	 * @param context
	 * @param content
	 */
	public static void WriteCopy(Context context,String content)
	{
		clipboardManager=(ClipboardManager) context
				.getSystemService(Context.CLIPBOARD_SERVICE);
		clipboardManager.setText(content);
	}
	
	/***
	 * 进行复制文字的获取
	 * @param context
	 * @return
	 */
	public static String WritePaste(Context context)
	{
		clipboardManager=(ClipboardManager) context
				.getSystemService(Context.CLIPBOARD_SERVICE);
		return clipboardManager.getText().toString();
	}
	
	

}
